// 引入createRouter创建路由
import { createRouter, createWebHashHistory } from "vue-router";

// 导出配置
export default createRouter({
    // 路由模式
    history: createWebHashHistory(),
    // 路由配置
    routes: [
        {
            path: '',
            component: () => import('@/pages/home/index.vue'),
        },
        {
            path: '/hospital',
            component: () => import('@/pages/hospital/index.vue'),
        },
        {
            path: '/',
            redirect: '/home',
        }
    ],
    // 弹窗滚动
    scrollBehavior() {
        return {
            left: 0,
            top: 0
        }
    }
})